﻿@model PageList<CompanyListModel>
@{
    ViewBag.Title = "设备备案机构列表";
}
@section JS
{
    <script src="@Url.Content("~/Scripts/CompanyList.js")" type="text/javascript"></script>
}
@section BodyNav{
    > @Html.ActionLink("备案机构列表", "List", "Company")
}
<table class="list">
    <tr class="head">
        <th width="96">
            操作
        </th>
        <th width="55">
            机构编号
        </th>
        <th width="300">
            机构名称
        </th>
        <th width="130">
            法人
        </th>
        <th width="130">
            联系人
        </th>
        <th>
            生产资质
        </th>
        <th>
            安装资质
        </th>
        <th>
            租赁资质
        </th>
    </tr>
    @foreach (var m in Model)
    {
        <tr>
            <td>
                @Html.ActionLink("查看", "Detail", "Company", new { id = m.Id }, new { @class = "lnkDetail" })
                @if (UserAuthnicationHelper.CurrentUserType > UserTypes.Editor)
                {
                    @Html.ActionLink("修改", "Edit", "Company", new { id = m.Id }, new { @class = "lnkEdit" })
                    @Html.ActionLink("删除", "Delete", "Company", new { id = m.Id }, new { @class = "lnkDel" })
                }
            </td>
            <td>@m.NO
            </td>
            <td>
                @m.Name
            </td>
            <td>@m.Legal (@m.PhoneOfLegal)
            </td>
            <td>@m.Contactor (@m.PhoneOfContactor)
            </td>
            <td>@Html.Raw(m.CanProduct ? String.Format("有 ({0})", m.ProductNO) : "")
            </td>
            <td>@Html.Raw(m.CanInstall ? String.Format("有 ({0})", m.InstallNO) : "")
            </td>
            <td>@Html.Raw(m.CanLend ? String.Format("有 ({0})", m.LendNO) : "")
            </td>
        </tr>
    }
</table>
<div class="pager">
    @Html.Raw(Html.Pager("page", Model.PageIndex, Model.PageSize, Model.TotalCount))
</div>
